<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<style>
	.bootbox-close-button {
		width: 19px;
		height: 19px;
		border: none;
		cursor: pointer;
		-webkit-appearance: none;
		float: right;
		top: 4px;
		left: -5px;
		position: relative;
		background: #E9F5FF url("assets/img/nav-img/icon_close.png") no-repeat 0 0;
	}
	.openAccount .modal-dialog {
		width: 60% !important;
	}

	.openAccount .modal-body {
		padding-bottom: 0;
	}
	input[type="text"],select,input[type="password"]{
		height: 30px!important;
		border-radius: 5px!important;
	}
	.openAccount .widget-body {
		box-shadow: none;
		background-color: #fff;
	}
</style>
<div class="row">
	<div class="col-lg-12 col-sm-12 col-xs-12">
		<div class="widget">
			<div class="widget-header bordered-bottom theme">
				<span class="widget-caption">管理员-${(editModel=='add')?string('新增','编辑')}</span>
				<div class="widget-buttons">
					<a href="#" data-toggle="collapse">
						<i class="fa fa-minus"></i>
					</a>
					<a href="#" data-toggle="maximize">
						<i class="fa fa-expand"></i>
					</a>
				</div>
			</div>
			<div class="widget-body">
				<div class="row">
					<form class="editForm" action="${openAccountUrl}" method="post" responseType="JSON" role="form" id="editForm_${serializeNum}"
						  data-bv-submitButtons="#editFormSubmitBtn_${serializeNum}"
						  data-bv-message="This value is not valid"
						  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
						  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
						  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">

						<input type="hidden" name="id" value="${editEntity.id}">
						<input type="hidden" name="roleIds_old" value="${roleIds}">
						<input type="hidden" name="post" value="${editEntity.post}">
						<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-lg-12 col-sm-12 col-xs-12">
								<div class="col-lg-6 col-sm-6 col-xs-6">
									<div class="form-group">
										<label class="col-lg-4 col-sm-4 col-xs-4 control-label no-padding-right">员工姓名：</label>
										<div class="col-lg-6 col-sm-6 col-xs-6">
											<label class="control-label">${editEntity.realName}</label>
										</div>
									</div>
								</div>
								<div class="col-lg-6 col-sm-6 col-xs-6">
									<div class="form-group">
										<label class="col-lg-4 col-sm-4 col-xs-4 control-label no-padding-right">员工职务：</label>
										<div class="col-lg-6 col-sm-6 col-xs-6">
											<label class="control-label"><@dictionary groupCode="post" dictionaryCode="${editEntity.post}" ;post>${post.value }</@dictionary></label>
										</div>
									</div>
								</div>
							</div>
						</#if>

						<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-lg-12 col-sm-12 col-xs-12">
								<div class="col-lg-6 col-sm-6 col-xs-6">
									<div class="form-group">
										<label class="col-lg-4 col-sm-4 col-xs-4 control-label no-padding-right"><span
												class="red">*</span>账号名称：</label>
										<div class="col-lg-6 col-sm-6 col-xs-6">
											<input data-bv-remote="true"
												   data-bv-remote-url="sysAdminUserController/verificationUserName.do?id=${editEntity.id}"
												   data-bv-remote-message="账号名称已存在！" required="required"
												   data-bv-message="请填写账号名称！" maxlength="12" name="userName" alt="账号名称"
												   id="userName" placeholder="账号名称" type="text" title="账号名称"
												   class="form-control" value="${editEntity.userName}"/>
											<span class="text"></span>
										</div>
									</div>
								</div>
								<div class="col-lg-6 col-sm-6 col-xs-6">
									<label class="control-label">支持数字/字母，建议使用姓名全拼</label>
								</div>
							</div>
						</#if>

						<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-lg-12 col-sm-12 col-xs-12">
								<div class="col-lg-6 col-sm-6 col-xs-6">
									<div class="form-group">
										<label class="col-lg-4 col-sm-4 col-xs-4 control-label no-padding-right">密码：</label>
										<div class="col-lg-6 col-sm-6 col-xs-6">
											<#if editEntity.userPassword??>
												<input data-bv-message="请填写密码！" maxlength="18" placeholder="密码" onkeyup="falsePassword(this)"
													   type="password" class="form-control falsePassword" value="qzy123456"/>
											<#else>
												<input data-bv-message="请填写密码！" maxlength="18" placeholder="密码" onkeyup="falsePassword(this)"
													   type="password" class="form-control falsePassword" value=""/>
											</#if>
											<input data-bv-message="请填写密码！"
												   name="userPassword" alt="密码" id="userPassword" placeholder="密码"
												   type="hidden" title="密码" class="form-control"
												   value="${editEntity.userPassword}"/>
											<span class="text"></span>
										</div>
									</div>
								</div>
								<div class="col-lg-6 col-sm-6 col-xs-6">
									<label class="control-label">密码为空时，使用初始密码：qzy123456</label>
								</div>
							</div>
						</#if>

						<#if (true && edieditModel=='add')||(truetModel=='add')||(true && editModel=='edit')>
							<div class="col-lg-12 col-sm-12 col-xs-12">
								<div class="col-lg-12 col-sm-12 col-xs-12">
									<div class="form-group">
										<label class="col-lg-2 col-sm-2 col-xs-2 control-label no-padding-right"><span
												class="red">*</span>权限设置：</label>
										<div class="col-lg-10 col-sm-10 col-xs-10 control-label text-align-left">
											<#list rolesList as role>
												<label>
													<input required="required" type="radio" name="roleIds" id="roleIds" value="${role.id}" style="margin-right: 5px;opacity: 1;position: static;height: 18px!important;margin-top: 4px!important;" >
												</label>
												<label style="margin-right: 10px" >${role.roleName}</label>
											</#list>
										</div>
									</div>
								</div>
							</div>
						</#if>

						<div class="col-lg-12 col-sm-12 col-xs-12">
							<div class="text-align-center ">
								<button style="min-width: 80px;margin-right:20px;" type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">确定</button>
								<button style="width: 80px" type="button" class="btn btn-blue" data-dismiss="modal">取消</button>
							</div>
						</div>




						<input type="hidden" name="sex" value="${editEntity.sex}">
					    <#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xs-12 col-md-12 col-lg-12 " >
								<div class="col-xs-6">
									<div class="form-group">
										<label class="col-xs-4 control-label text-align-right">员工性别：</label>
										<div class="col-xs-8 nopadding" style="max-width: 150px">
											<label>
												<input type="radio" name="sex" value="1" style="margin-right: 5px;opacity: 1;position: static;height: 18px!important;" checked="true">
											</label><label style="margin-right: 10px">男</label>
											<label>
												<input type="radio" name="sex" value="2"  style="margin-right: 5px;opacity: 1;position: static;height: 18px!important;">
											</label>
											<label>女</label>
										</div>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="realName" value="${editEntity.realName}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="realName" class="col-sm-2 control-label no-padding-right">真实名称</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="12" name="realName" alt="真实名称" id="realName" placeholder="真实名称" type="text" title="真实名称" class="form-control"  value="${editEntity.realName}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="email" value="${editEntity.email}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="email" class="col-sm-2 control-label no-padding-right">邮箱</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="50" name="email" alt="邮箱" id="email" placeholder="邮箱" type="text" title="邮箱" class="form-control"  value="${editEntity.email}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="wechat" value="${editEntity.wechat}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="wechat" class="col-sm-2 control-label no-padding-right">微信</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="20" name="wechat" alt="微信" id="wechat" placeholder="微信" type="text" title="微信" class="form-control"  value="${editEntity.wechat}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="qq" value="${editEntity.qq}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="qq" class="col-sm-2 control-label no-padding-right">QQ</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="15" name="qq" alt="QQ" id="qq" placeholder="QQ" type="text" title="QQ" class="form-control"  value="${editEntity.qq}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
                      	</#if>

						<input type="hidden" name="partTime" value="${editEntity.partTime}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
						<div class="col-xm-12 col-sm-6 col-lg-4">
							<div class="form-group">
								<label for="partTime" class="col-sm-2 control-label no-padding-right">兼任职务</label>
								<div class="col-sm-10">
									<input data-bv-message="The field is not valid"maxlength="11" name="partTime" alt="兼任职务" id="partTime" placeholder="兼任职务" type="text" title="兼任职务" class="form-control"  value="${editEntity.partTime}" />
									<span class="text"></span>
								</div>
							</div>
						</div>
						</#if>

						<input type="hidden" name="nation" value="${editEntity.nation}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xs-12 col-md-12 col-lg-12">
								<div class="col-xs-6">
									<div class="form-group">
										<label class="col-xs-4 control-label text-align-right">员工民族：</label>
										<div class="col-xs-8 nopadding" style="max-width: 150px">
											<select name="nation" class="col-xs-12 nopadding"
													style="padding-left: 7px!important;">
												<option value="">请选择</option>
												<@dictionary groupCode="nation";dics>
												<#list dics as dic>
													<option value="${dic.code}">${dic.value}</option>
												</#list>
											</@dictionary>
											</select>
										</div>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="education" value="${editEntity.education}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xs-12 col-md-12 col-lg-12">
								<div class="col-xs-6">
									<div class="form-group">
										<label class="col-xs-4 control-label text-align-right">员工学历：</label>
										<div class="col-xs-8 nopadding" style="max-width: 150px">
											<select name="educationBackground" class="col-xs-12 nopadding"
													style="padding-left: 7px!important;">
												<option value="">请选择</option>
												<@dictionary groupCode="education";dics>
												<#list dics as dic>
													<option value="${dic.code}">${dic.value}</option>
												</#list>
											</@dictionary>
											</select>
										</div>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="idCardNum" value="${editEntity.idCardNum}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
						<div class="col-xm-12 col-sm-6 col-lg-4">
							<div class="form-group">
								<label for="idCardNum" class="col-sm-2 control-label no-padding-right">身份证号</label>
								<div class="col-sm-10">
									<input data-bv-message="The field is not valid"maxlength="18" name="idCardNum" alt="身份证号" id="idCardNum" placeholder="身份证号" type="text" title="身份证号" class="form-control"  value="${editEntity.idCardNum}" />
									<span class="text"></span>
								</div>
							</div>
						</div>
						</#if>

						<input type="hidden" name="educationBackground" value="${editEntity.educationBackground}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
						<div class="col-xs-12 col-md-12 col-lg-12 " >
							<div class="col-xs-6">
								<div class="form-group">
									<label for="educationBackground" class="col-xs-4 control-label text-align-right">员工学历：</label>
									<div class="col-xs-8 nopadding" style="max-width: 150px">
										<input data-bv-message="The field is not valid" size="20" name="educationBackground"
											   alt="员工学历"
											   id="educationBackground" placeholder="员工学历" type="text" title="员工学历"
											   class="form-control"
											   value="${editEntity.educationBackground}"/>
										<span class="text"></span>
									</div>
								</div>
							</div>
						</div>
						</#if>

						<input type="hidden" name="phoneNumber" value="${editEntity.phoneNumber}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="phoneNumber" class="col-sm-2 control-label no-padding-right">联系电话</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="11" name="phoneNumber" alt="联系电话" id="phoneNumber" placeholder="联系电话" type="text" title="联系电话" class="form-control"  value="${editEntity.phoneNumber}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="festnetznummer" value="${editEntity.festnetznummer}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="festnetznummer" class="col-sm-2 control-label no-padding-right">座机号</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="12" name="festnetznummer" alt="座机号" id="festnetznummer" placeholder="座机号" type="text" title="座机号" class="form-control"  value="${editEntity.festnetznummer}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="entryTime" value="${editEntity.entryTime}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
                            <div class="col-xm-12 col-sm-6 col-lg-4">
                                <div class="form-group">
                                    <label for="entryTime" class="col-sm-2 control-label no-padding-right">入职时间</label>
                                    <div class="col-xs-8 nopadding" style="max-width: 150px">
                                        <span class="input-icon icon-left">
                                            <input data-bv-date-format="YYYY-MM-DD"
                                                   data-bv-message="The field is not valid"
                                                   data-bv-date-message="请正确输入一个时间" data-bv-date="true" size="10"
                                                   name="entryTime" alt="入职时间" id="entryTime" placeholder="入职时间"
                                                   type="text" title="入职时间"
                                                   class="form-control form-control date-picker"
                                                   onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd'})"
                                                   value="${editEntity.entryTime}"/>
                                            <i class="fa fa-calendar"></i>
                                        </span>
                                    </div>
                                </div>
                            </div>
						</#if>

						<input type="hidden" name="schoolId" value="${editEntity.schoolId}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xs-12 col-md-12 col-lg-12">
								<div class="col-xs-6">
									<div class="form-group">
										<label class="col-xs-4 control-label text-align-right">所属园所：</label>
										<div class="col-xs-8 nopadding" style="max-width: 150px">
											<select name="schoolId" class="col-xs-12 nopadding"
													style="padding-left: 7px!important;">
												<option value="">请选择</option>

											</select>
										</div>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="schoolId" value="${editEntity.isCanDelete}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group has-feedback">
									<label for="isCanDelete" class="col-sm-2 control-label no-padding-right">是否可删除</label>
									<div class="col-sm-10">
										<input type="hidden" name="isCanDelete" value=${(editEntity.isCanDelete???string(editEntity.isCanDelete?string('true','false'),'false'))!'false'}>
										<label>
											<input data-target-input-name="isCanDelete" data-bv-message="The field is not valid"maxlength="1" alt="是否可删除" id="isCanDelete" placeholder="是否可删除" type="checkbox" title="是否可删除" class="form-control checkbox-slider slider-icon yesno"  ${(editEntity.isCanDelete???string(editEntity.isCanDelete?string('checked',''),''))!''}>
											<span class="text"></span>
										</label>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="createTime" value="${editEntity.createTime}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="createTime" class="col-sm-2 control-label no-padding-right">创建时间</label>
									<div class="col-sm-10">
										<span class="input-icon icon-left">
											<input data-bv-date-format="YYYY-MM-DD hh:mm:ss" data-bv-message="The field is not valid" data-bv-date-message="请正确输入一个时间" data-bv-date="true"maxlength="19" name="createTime" alt="创建时间" id="createTime" placeholder="创建时间" type="text" title="创建时间" class="form-control form-control date-picker" onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})"  value="${editEntity.createTime}"/>
											<i class="fa fa-calendar"></i>
										</span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="lastUpdateTime" value="${editEntity.lastUpdateTime}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="lastUpdateTime" class="col-sm-2 control-label no-padding-right">最后修改时间</label>
									<div class="col-sm-10">
										<span class="input-icon icon-left">
											<input data-bv-date-format="YYYY-MM-DD hh:mm:ss" data-bv-message="The field is not valid" data-bv-date-message="请正确输入一个时间" data-bv-date="true"maxlength="19" name="lastUpdateTime" alt="最后修改时间" id="lastUpdateTime" placeholder="最后修改时间" type="text" title="最后修改时间" class="form-control form-control date-picker" onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})"  value="${editEntity.lastUpdateTime}"/>
											<i class="fa fa-calendar"></i>
										</span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="createUser" value="${editEntity.createUser}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="createUser" class="col-sm-2 control-label no-padding-right">创建人</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="32" name="createUser" alt="创建人" id="createUser" placeholder="创建人" type="text" title="创建人" class="form-control"  value="${editEntity.createUser}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<!--<input type="hidden" name="isForbidden" value="${editEntity.isForbidden}">-->
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group has-feedback">
									<label for="isForbidden" class="col-sm-2 control-label no-padding-right">是否禁用</label>
									<div class="col-sm-10">
										<input type="hidden" name="isForbidden" value=${(editEntity.isForbidden???string(editEntity.isForbidden?string('true','false'),'false'))!'false'}>
										<label>
											<input data-target-input-name="isForbidden" data-bv-message="The field is not valid"maxlength="1" alt="是否禁用" id="isForbidden" placeholder="是否禁用" type="checkbox" title="是否禁用" class="form-control checkbox-slider slider-icon yesno"  ${(editEntity.isForbidden???string(editEntity.isForbidden?string('checked',''),''))!''}>
											<span class="text"></span>
										</label>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="version" value="${editEntity.version}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="version" class="col-sm-2 control-label no-padding-right">版本</label>
									<div class="col-sm-10">
										<input  data-bv-integer-message="The field is number" data-bv-message="The field is not valid" data-bv-integer="true"maxlength="11" name="version" alt="版本" id="version" placeholder="版本" type="text" title="版本" class="form-control"  value="${editEntity.version}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
						</#if>

						<input type="hidden" name="nativePlace" value="${editEntity.nativePlace}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
						<div class="col-xm-12 col-sm-6 col-lg-4">
							<div class="form-group">
								<label for="nativePlace" class="col-sm-2 control-label no-padding-right">籍贯</label>
								<div class="col-sm-10">
									<input  data-bv-integer-message="The field is number" data-bv-message="The field is not valid" data-bv-integer="true"maxlength="11" name="nativePlace" alt="籍贯" id="nativePlace" placeholder="籍贯" type="text" title="籍贯" class="form-control"  value="${editEntity.nativePlace}" />
									<span class="text"></span>
								</div>
							</div>
						</div>
						</#if>

						<input type="hidden" name="birthdayDate" value="${editEntity.birthdayDate}">
						<#if (false && editModel=='add')||(false && editModel=='edit')>
						<div class="col-xm-12 col-sm-6 col-lg-4">
							<div class="form-group">
								<label for="birthdayDate" class="col-sm-2 control-label no-padding-right">出生日期</label>
								<div class="col-xs-8 nopadding" style="max-width: 150px">
										<span class="input-icon icon-left">
											<input data-bv-date-format="YYYY-MM-DD"
												   data-bv-message="The field is not valid"
												   data-bv-date-message="请正确输入一个时间" data-bv-date="true" size="10"
												   name="birthdayDate" alt="出生日期" id="birthdayDate" placeholder="出生日期"
												   type="text" title="出生日期"
												   class="form-control form-control date-picker"
												   onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd'})"
												   value="${editEntity.birthdayDate}"/>
											<i class="fa fa-calendar"></i>
										</span>
								</div>
							</div>
						</div>
						</#if>
						<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<input type="hidden" name="headPortrait" value="${editEntity.headPortrait}">
								<input type="hidden" name="deleteHeadPortrait">
								<div class="form-group">
									<label for="headPortrait" class="col-sm-2 control-label no-padding-right">头像</label>
									<div class="col-sm-10">
										<div class="col-xs-9">
											<input data-bv-message="The field is not valid"maxlength="100" name="newHeadPortrait" id="headPortrait${serializeNum}" readonly="readonly" alt="头像" placeholder="头像" type="text" title="头像" class="form-control"/>
											<span class="text"></span>
										</div>
										<div class="col-sm-2">
											<a href="javascript:void(0);" class="btn theme" onclick="uploadHeadPortrait('editForm_${serializeNum}','newHeadPortrait','headPortrait','headPortrait_imgPrev${serializeNum}','headPortrait')"><i class="fa fa-upload"></i>上传</a>
										</div>
										<div class="col-sm-12 imgPrev" id="headPortrait_imgPrev${serializeNum}">
											<@config key="qiniu.domain" inner="true";qiniuDomin>
												<@file fileIds=editEntity.headPortrait separator=',';files>
													<#list files as file>
														<p>
															<!--<img src="${pv.fileRedPath}/${file.relativePath}/${file.fileName}" width="50" height="50">-->
															<img src="http://${qiniuDomin}/${file.qiniuKey}" width="50" height="50" class="imgViewer">
															${file.fileName}<#if file.size??>&nbsp;&nbsp;尺寸:${file.size}</#if>
															<a class="btn btn-default btn-xs icon-only red delete textAling-right" href="javascript:void(0);" onclick="removeFileUseLog(this,'editForm_${serializeNum}','deleteHeadPortrait','headPortrait','${file.id}')"><i class="fa fa-trash-o"></i></a>
														</p>
													</#list>
												</@file>
											</@config>
										</div>
									</div>
								</div>
							</div>
							<script type="text/javascript">
                    function uploadHeadPortrait(formId, targetShowInputName, targetHideInputName, imgPrevId, groupName) {
                        showUploadFileDialog({
                            groupName: groupName,//该参数将参与文件缓存时的唯一标识值,如果配置了文件服务器,该参数同时会参与文件服务器文件存储目录分配,为保证文件不丢失, 务必保证同一编辑页面此参数唯一
                            size:"large",//文件上传组件层大小，small 小,large 大
                            title:"文件上传",//文件上传组件层标题
                            width:"",//文件上传组件层宽度
                            height:"",//文件上传组件层高度
                            fileNumLimit: 1,//验证文件总数量, 超出则不允许加入队列
                            fileSizeLimit:"209715200",// 验证文件总大小是否超出限制, 超出则不允许加入队列
                            fileSingleSizeLimit:"52428800",
                            accept:{
                                title:"图片文件",//文字描述
                                extensions:"gif,jpg,jpeg,bmp,png,psd",//允许的文件后缀，不带点，多个用逗号分割
                                mimeTypes:"image/jpg,image/jpeg,image/png,image/gif,image/bmp,image/psd"// 多个用逗号分割
                            },
                            imgMaxWidth:"-1",//图片文件允许的最大宽度
                            imgMaxHeight:"-1",// 图片文件允许的最大高度
                            sizes: '',//缩放尺寸(格式：宽度-高度,宽度-高度,宽度-高度....),如：500-300,400-300
                        }, function (result) {//点击确认的回调函数
                            if (result) {
                                console.log(result.fileList);
                                var showWidth = 50, showHeight = 50;
                                var fileList = result.fileList;
                                $("#" + imgPrevId+" p a").click();
                                for (var i = 0, len = fileList.length; i < len; i++) {
                                    var file = fileList[i];
                                    var width = file.size.width;
                                    var height = file.size.height;
                                    var uuid = file.uuid;
                                    var targetInput = $("#" + formId + " [name='" + targetShowInputName + "']").val(groupName + "=>" + targetHideInputName);
                                    if (width == -1 && height == -1) {
                                        $("#" + imgPrevId).append('<p><img  class="imgViewer"  src="fileUpload/previewUploadImg.do?groupName=' + groupName + '&fileId=' + uuid + '" width="' + showWidth + '" height="' + showHeight + '">'+file.name+'<a class="btn btn-default btn-xs icon-only red delete" href="javascript:void(0);" onclick="removeHeadPortraitUploadTempleFile(this,'+"'"+groupName+"','"+uuid+"'"+')"><i class="fa fa-trash-o"></i></a></p>');
                                    }
                                }
                            }
                        }, function () {//点击取消的回调函数
                            console.log("执行关闭/取消的回调函数");
                        })
                    }
                    //移除临时文件
                    function removeHeadPortraitUploadTempleFile(that,groupName,uuid){
                        console.log("clear temp file  by  id...")
                        ajaxRequest("fileUpload/clearTempFile.do", {groupName: groupName,fileId:uuid}, function (result) {
                                if (result.resCode == "200") {
                                    console.log("成功清除缓存文件："+uuid);
                                    $(that).parents("p").remove();
                                } else {
                                    var message = result.resMsg;
                                    bootbox.alert({
                                        title: "错误提示",
                                        size: 'small',
                                        message: message
                                    });
                                }
                            },
                            function (XMLHttpRequest, textStatus, errorThrown) {
                                ajaxError(errorThrown);
                            }, "GET", "JSON")
                    }
			</script>
				</#if>
				<!--<div class="col-sm-12">-->
					<!--<#if sign??>-->
						<!--<input type="button" class="btn btn-default" data-dismiss="modal" value="返回" onclick="backView1()"/>-->
						<!--<#else>-->
							<!--<input type="button" class="btn btn-default" data-dismiss="modal" value="返回" onclick="backView()"/>-->
					<!--</#if>-->
					<!--<button type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">保存</button>-->
				<!--</div>-->
				</form>
			</div>
		</div>
	</div>
</div>
</div>
<script src="assets/js/select2/select2.js"></script>
<script src="assets/js/validation/bootstrapValidator_init.js"></script>
<script>
    initImgPrev($(".imgPrev"));
    $(".selectpicker_${serializeNum}").select2();
    var arr = '${roleIds}'.split(",");
    $("[name='roleIds']").select2("val", arr);
    function removeFileUseLog(that,formId,targetDeleteInputName,targetHideInputName,fileId){
        var useFileIds=$("#" + formId + " [name='" + targetHideInputName + "']");
        var targetDeleteInput=$("#" + formId + " [name='" + targetDeleteInputName + "']");
        var ids=useFileIds.val().split(",");
        var newIds="";
        for(var i=0,len=ids.length;i<len;i++){
            if(ids[i]==fileId){
                targetDeleteInput.val(targetDeleteInput.val()+","+fileId);
                continue;
            }
            newIds+=ids[i];
            if(i!=len-1){
                newIds+=",";
            }
        }
        useFileIds.val(newIds);
        $(that).parents("p").remove();
    }

    function backView1() {
        //toView("/ti/tiDesignateOrderController/tiDesignateOrderList.do",false);
        window.location.reload();
    }
    if ('${sign}' != '') {
        $("#editForm_${serializeNum}").on("ajaxSubmitCallback",function(event,data){
            if(data.resCode==200){
                alert(data.resMsg);
                resetValidatorForm(this);
                if(isInnerEdit==true){
                    backView1();
                }else{
                    dialog.modal("hide");
                    that.parents(".widget").find(".searchCriteria .widget-buttons .businessBtns .search").click();
                }
            }else{
                ajaxError(data.resMsg);
            }
        });
    }
    
    function falsePassword(that) {
		$("#userPassword").val($(that).val());
    }

    $("#editForm_${serializeNum}").bind("ajaxSubmitCallback", function (event, result) {
        if (result.resCode == 200) {
            bootbox.hideAll();
            logger.info(result.resMsg, true);
            toView('sysAdminUserController/sysAdminUserList.do',true,'POST',{pageSize:10})
        } else {
            logger.error(result.resMsg);
        }
    });
</script>